package com.itfreer.gis.map.style.entity;

import java.io.Serializable;
import com.itfreer.form.api.entity.EntityBase;
import com.itfreer.utils.file.FileMeta;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * 定义我的样式目录实体
 */
@Entity(name = "gis_map_style_directory")
public class MapStyleDirectoryEntity extends EntityBase implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "id", length = 50, nullable = false)
	private String id;

	/**
	 * 方案名称
	 */
	@Column(name = "s_name", length = 255, nullable = true)
	private String name;

	/**
	 * 排序值
	 */
	@Column(name = "i_order", nullable = true)
	private Integer order;

	/**
	 * 方案信息
	 */
	@Column(name = "s_info", nullable = true)
	private String info;

	/**
	 * 是否推荐 推荐方案，将在web端和移动端做切换展示用
	 */
	@Column(name = "b_recommend", nullable = true)
	private Boolean recommend;

	/**
	 * 是否有效
	 */
	@Column(name = "b_valid", nullable = true)
	private Boolean valid = true;

	/**
	 * 示例图
	 */
	@Column(name = "s_image", nullable = true, columnDefinition = "text")
	private String image;

	/**
	 * 租户ID
	 */
	@Column(name = "s_tenantid", length = 50, nullable = true)
	private String tenantID;

	/**
	 * 租户名称
	 */
	@Column(name = "s_tenantname", length = 50, nullable = true)
	private String tenantName;

	/**
	 * id
	 */
	public String getId() {
		return id;
	}

	/**
	 * id
	 */
	public void setId(String value) {
		this.id = value;
	}

	/**
	 * 方案名称
	 */
	public String getName() {
		return name;
	}

	/**
	 * 方案名称
	 */
	public void setName(String value) {
		this.name = value;
	}

	/**
	 * 方案信息
	 */
	public String getInfo() {
		return info;
	}

	/**
	 * 方案信息
	 */
	public void setInfo(String value) {
		this.info = value;
	}

	/**
	 * 排序
	 */
	public Integer getOrder() {
		return order;
	}

	public void setOrder(Integer order) {
		this.order = order;
	}

	public Boolean getRecommend() {
		return recommend;
	}

	public void setRecommend(Boolean recommend) {
		this.recommend = recommend;
	}

	/**
	 * 是否有效
	 */
	public Boolean getValid() {
		return valid;
	}

	/**
	 * 是否有效
	 */
	public void setValid(Boolean isValid) {
		this.valid = isValid;
	}

	public FileMeta[] getImage() {
		return super.getFileArray(this.image);
	}

	public void setImage(FileMeta[] image) {
		this.image = super.getFileString(image);
	}

	public String getTenantID() {
		return tenantID;
	}

	public void setTenantID(String tenantID) {
		this.tenantID = tenantID;
	}

	public String getTenantName() {
		return tenantName;
	}

	public void setTenantName(String tenantName) {
		this.tenantName = tenantName;
	}
}
